import request from '@/utils/request'

/**
 * @description: 获取采购入库单清单
 * @param {*} data
 * @return {*}
 */
export function getCgrkdOrderList(params) {
  return request({
    url: '/order/cgrkd/list',
    method: 'get',
    params
  })
}

/**
 * @description: 保存采购入库单
 * @param {*} params
 * @return {*}
 */
export function saveCgrkdOrder(data) {
  return request({
    url: '/order/cgrkd/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取采购入库单详情
 * @param {*} params
 * @return {*}
 */
export function getCgrkdDetail(params) {
  return request({
    url: '/order/cgrkd/detail',
    method: 'get',
    params
  })
}

/**
 * @description: 单据更新
 * @param {*} params
 * @return {*}
 */
export function updateCgrkd(data) {
  return request({
    url: '/order/cgrkd/update',
    method: 'post',
    data
  })
}

/**
 * @description: 单据、反审核
 * @param {*} data
 * @return {*}
 */
export function examineCgrkd(data) {
  return request({
    method: 'post',
    url: '/order/cgrkd/examine',
    data
  })
}

/**
 * @description: 销售出库单删除
 * @param {*} data
 * @return {*}
 */
export function deleteCgrkd(data) {
  return request({
    url: '/order/cgrkd/delete',
    method: 'post',
    data
  })
}
